package com.mxpio.erp.common.asset.entity;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.mxpio.erp.common.inventory.entity.Warehouse;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_ASSET_BR_MATERIAL")
@Schema(description = "借出物料表")
public class BorrowOutMaterial  extends BaseEntity {
	private static final long serialVersionUID = 1L;
	@Id
	@Generator
	@Column(name = "ID_", updatable = false)
	@Schema(description = "ID")
	private String id;
	
	@Column(name = "ITEM_CODE_", updatable = false)
	@Schema(description = "物料编码")
	private String itemCode;
	
	@Column(name = "LOT_NO_")
	@Schema(description = "批次")
	private String lotNo;
	
	@Column(name = "WH_CODE_")
	@Schema(description = "仓库代码")
	@Dict(dicCode = "whCode" ,dicEntity = Warehouse.class, dicText = "whName")
	private String whCode;
	
	@Column(name = "QUANTITY_")
	@Schema(description = "数量")
	private BigDecimal quantity;

	@Transient
	@Schema(description = "物料名称")
	private String itemName ;

	@Transient
	@Schema(description = "规格型号")
	private String itemSpec ;

	@Transient
	@Schema(description = "单位编号")
	private String unitCode;
}
